#include <iostream>
#include <memory>
#include "TcpServer.hpp"

void Usage(std::string proc)
{
    std::cout << "\n\r" << proc <<"prot[1024+]" << std::endl;
}
int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    uint16_t serverport = std::stoi(argv[1]);
    std::unique_ptr<TcpServer> tcpserver(new TcpServer(serverport));    
    tcpserver->Init();
    tcpserver->Start();
    return 0;
}